package com.example.myblog.mapper;

import com.example.myblog.entity.ArticleInfo;
import com.example.myblog.entity.vo.ArticleInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {
    int add(ArticleInfo articleInfo);
    ArticleInfo getDetailByIdAndUid(@Param("id")Integer id,@Param("uid")Integer uid);
    int update(ArticleInfo articleInfo);
    ArticleInfoVO getDetail(@Param("id")Integer id);
    int addRCount(@Param("id")Integer id);
    List<ArticleInfo> getMyArticleList(@Param("uid")Integer id);
    int del(@Param("id")Integer id,@Param("uid")Integer uid);
    List<ArticleInfo> getListByPage(@Param("pageSize")Integer pageSize,
                                    @Param("offset")Integer offset);
    Integer getCount();
}
